<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>餐厅收银系统 - 登录</title>
    <style>
        /* 简单样式：居中登录框 */
        .login-container {
            width: 350px;
            margin: 150px auto;
            padding: 30px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
        .title {
            text-align: center;
            color: #333;
            margin-bottom: 25px;
            font-size: 22px;
        }
        .form-item {
            margin-bottom: 20px;
        }
        .form-item label {
            display: block;
            margin-bottom: 8px;
            color: #666;
        }
        .form-item input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        .login-btn {
            width: 100%;
            padding: 12px;
            background-color: #2f54eb;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
        }
        .login-btn:hover {
            background-color: #1d39c4;
        }
        .error-msg {
            text-align: center;
            color: #f5222d;
            margin-bottom: 15px;
        }
    </style>
</head>
<body>
<div class="login-container">
    <h2 class="title">收银系统登录</h2>
    <!-- 显示错误提示（登录失败时） -->
    <div class="error-msg">${errorMsg}</div>
    <!-- 登录表单：提交到/login（Servlet配置的URL） -->
    <form action="/javawebProject01/login" method="post">
        <div class="form-item">
            <label for="username">账号</label>
            <input type="text" id="username" name="username" required placeholder="请输入登录账号">
        </div>
        <div class="form-item">
            <label for="password">密码</label>
            <input type="password" id="password" name="password" required placeholder="请输入登录密码">
        </div>
        <button type="submit" class="login-btn">登录</button>
    </form>
</div>
</body>
</html>